/**
 * Project Name:YCApiServer-dao
 * File Name:LyricsMapper.java
 * Package Name:com.yc.music.mapper.dao
 * Date:2016年10月24日下午4:18:00
 * Copyright (c) 2016 
 *
 */
package com.yc.music.mapper.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yc.music.model.cooperate.CooperateWorkAccessVo;
import com.yc.music.model.cooperate.CooperateWorkVo;
import com.yc.music.model.musicWork.CooperateMusicWorkUser;
import com.yc.music.model.musicWork.CooperateWorkDetail;

/**
 * ClassName: CooperateWorkMapper <br/>
 * Function: 合作完成作品. <br/>
 * Reason: TODO ADD REASON(可选). <br/>
 * date:2016年10月26日
 *
 * @author qinhaiguan
 * @version 
 */
public interface CooperateWorkMapper {
	
	public int getCooperateWorkCountByDId(@Param("did") long did);
	
	public int getCountCooperateWorkCountByUId(@Param("uid") long uid);
	
	public List<CooperateWorkDetail> getCooperateWorkDetailByUid(@Param("uid") Long uid,
			@Param("start") int start, @Param("size") int size);
	
	public List<CooperateMusicWorkUser> getCooperateWorkByUid(@Param("uid") Long uid,
			@Param("start") int start, @Param("size") int size);
	
	public CooperateWorkVo getCooperateWorkById(@Param("did") long did);
	
	public List<CooperateWorkVo> getCooperateWorkByDId(@Param("did") long did,
			@Param("start") int start, @Param("size") int size);
	
	public int updateCooperateWorkAccess(@Param("id") long id,@Param("access") int access);
	
	public void updateCooperateWorkZannum(@Param("id") long id,@Param("iszan") int iszan)throws Exception;
	
	public void addCooperateOneLookNum(@Param("id") Long id);
	
	public CooperateWorkAccessVo getCooperateWorkNotAccessById(@Param("id") long id,@Param("endtime") Date endtime);
	
	public CooperateWorkAccessVo getCooperateWorkAccessById(@Param("id") long id);
	
	public int getCooperateWorkDelete(@Param("workid") long workid,@Param("uid") long uid);
}
